import psutil

for proc in psutil.process_iter(['pid', 'name','exe']):
    if proc.info['exe'] != None and "Visual Studio Code.app" in proc.info['exe'] :
        print(f"PID: {proc.info['pid']}, Name: {proc.info['name']},exec: {proc.info['exe']}")
    
